package com.qige.homework;

import java.util.Scanner;

public class homework6 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String str = input.next();
        boolean flag = false;
        for (int i = 0 ; i < str.length()/2 ; i++){
            String a = String.valueOf(str.charAt(i));
            String b = String.valueOf(str.charAt(str.length() - i - 1));
            if (a.equals(b)){
                flag = true;
            }
        }
        if (flag){
            System.out.println("回文数:true");
        }else {
            System.out.println("回文数:false");
        }
    }
}
